//
//  CoreDataMan.h
//  Eyess
//
//  Created by lanou on 15/11/18.
//  Copyright © 2015年 追随我心. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Play+CoreDataProperties.h"
#import "Every+CoreDataProperties.h"
#import "Sku+CoreDataProperties.h"



@interface CoreDataMan : NSObject
+ (CoreDataMan *)shareIntance;

/**
 *  添加播放收藏
 *
 *  @param playUrl 播放url
 *  @param imagUrl 图片
 *  @param title   标题或者描述
 */
- (void)addPlay:(NSString *)playUrl imagUrl:(NSString *)imagUrl title:(NSString *)title width:(NSInteger)width height:(NSInteger)height;

/**
 *  添加每日一晒
 *
 *  @param p_j_id  拼接id
 *  @param imagUrl 图片url
 *  @param title   标题或者描述
 */
- (void)addEvery:(NSString *)p_j_id imageUrl:(NSString *)imagUrl title:(NSString *)title width:(NSInteger)width height:(NSInteger)height;

/**
 *  添加购物单品
 *
 *  @param P_j_id   拼接id
 *  @param imageUrl 图片url
 *  @param title    标题或者描述
 *  @param type_id  拼接id
 */
- (void)addSku:(NSString *)P_j_id imageUrl:(NSString *)imageUrl title:(NSString *)title type_id:(NSString *)type_id width:(NSInteger)width height:(NSInteger)height;
/**
 *  取消播放收藏
 *
 *  @param playUrl 播放url
 */
- (void)deletePlayWithId:(NSString *)playUrl;

/**
 *  取消单品收藏
 *
 *  @param P_j_id 拼接id
 */
- (void)deleteSkuWithId:(NSString *)P_j_id;

/**
 *  取消每日一晒
 *
 *  @param P_j_id 拼接id
 */
- (void)deleteEveryWithId:(NSString *)P_j_id;

/**
 *  查找是否有此播放收藏
 *
 *  @param playUrl 播放的url
 *
 *  @return 返回布尔值
 */
- (BOOL)findPlayWithId:(NSString *)playUrl;

/**
 *  查找是否有单品收藏
 *
 *  @param P_j_id 拼接id
 *
 *  @return 返回布尔值
 */
- (BOOL)findSkuWithId:(NSString *)P_j_id;

/**
 *  查找每日一晒
 *
 *  @param P_j_id 拼接id
 *
 *  @return 返回布尔值
 */
- (BOOL)findEveryWithId:(NSString *)P_j_id;

//返回播放的数组
- (NSArray *)allPlay;

// 返回每日一晒的数组
- (NSArray *)allEvery;

//返回单品数组
- (NSArray *)allSku;

//删除播放的数组
- (void)deleteAllPlay;

// 删除每日一晒的数组
- (void)deleteAllEvery;

//删除单品数组
- (void)deleteAllSku;
@end
